﻿<%@ Page Title="Log In" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Login.aspx.cs" Inherits="TanzimSaqib.NoBrainer.Sample.Account.Login" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Log In
    </h2>
    <p>
        Please enter your username and password.
        <asp:HyperLink ID="RegisterHyperLink" runat="server" EnableViewState="false" NavigateUrl="~/Account/Register.aspx">Register</asp:HyperLink> if you don't have an account.
    </p>
    
    <span class="failureNotification">
        <asp:Literal ID="FailureText" runat="server"></asp:Literal>
    </span>
    
    <!-- Example: Model(you can also say View)-wide common error message -->
    <span runat="server" class="failureNotification" Model="ErrorMessage"></span>

    <div class="accountInfo">
        <fieldset class="login">
            <legend>Account Information</legend>
            <p>
                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Username:</asp:Label>
                <asp:TextBox runat="server" ID="UserName" CssClass="textEntry" Model="UserName"></asp:TextBox>

                <!-- Example: automatic error binding from Model to View -->
                <span runat="server" class="failureNotification" Model-Error="UserName" />
            </p>
            <p>
                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                <asp:TextBox runat="server" ID="Password" CssClass="passwordEntry" TextMode="Password" Model="Password"></asp:TextBox>

                <!-- Example: 
                    1. HTML-attribute level CMS capability 
                    2. Show/hide CMS driven error message by Cms-Error
                -->
                <span runat="server" class="<%# Cms[&quot;spnPasswordError&quot;].CssClass %>" Cms-Error="Password">
                    <!-- Example: strongly typed Model -->
                    <%# Cms["spnPasswordError"].Content %>
                </span>
            </p>
            <p>
                <asp:CheckBox runat="server" ID="RememberMe" Model="PersistentCookieEnabled"/>
                <asp:Label ID="RememberMeLabel" runat="server" AssociatedControlID="RememberMe" CssClass="inline">Keep me logged in</asp:Label>
            </p>
        </fieldset>
        <p class="submitButton">
            <asp:Button ID="LoginButton" runat="server" Text="Log In" />
        </p>
    </div>

</asp:Content>
